import {observable,action,computed} from 'mobx'


class user {
    user
    routerurl
    @observable isLogin=false;
    @computed get user(){
        return JSON.parse(sessionStorage.getItem('user')||"{}")
    }
    set user(value){
        sessionStorage.setItem('user',JSON.stringify(value))
    }
    @computed get routerurl(){
        return JSON.parse(sessionStorage.getItem('routerurl')||"{}")
    }
    set routerurl(value){
        sessionStorage.setItem('routerurl',JSON.stringify(value))
    }

}

export default new user();